package com.mall.dao;

import com.mall.domain.Dict;
import com.mall.domain.ItemGoods;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 热词的持久化层接口
 * @author : liangY
 * @date : 2021-01-14 0:16
 */
@Repository
public interface IDictDao {

    /**
     * 查询所有热词
     * @return
     */
    @Select("select * from tb_dict where status=1 order by num desc limit 0,5")
    List<Dict> findAll();

    @Insert("update tb_dict set num=num + 1 where dict like #{dict}")
    Integer update(Dict dict);
}
